package deibay.server.frontend.commands;

import deibay.datamodel.Item;
import deibay.messages.Message;
import deibay.messages.RequestItemDetailsMsg;
import deibay.messages.RequestSellerItemDetailsMsg;
import deibay.messages.SendItemDetailsMsg;
import deibay.messages.SendSellerItemDetailsMsg;
import deibay.server.eventargs.GetItemEventArg;
import deibay.server.eventargs.GetSellerItemEventArg;
import deibay.server.events.GetItemEvent;
import deibay.server.events.GetSellerItemEvent;
import deibay.server.frontend.FrontEndCore;
import deibay.users.User;

public class RequestSellerItemDetailsCommand extends Command{

	public RequestSellerItemDetailsCommand(User user, Message msg) {
		super(user, msg);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void execute() {
		RequestSellerItemDetailsMsg msg = (RequestSellerItemDetailsMsg)message;
		String itemID = msg.getItemID();		
		FrontEndCore.getInstance().getServerConnection().send(new GetSellerItemEvent(new GetSellerItemEventArg(user, itemID)));
	}

}
